<%@ page language="java" pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@ include file="../include/taglib.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head> 
  	<title>餐厅简介</title>
  	<%@ include file="../include/jsCss.jsp" %> 
  </head>
  <body>
  	<form action="mealbox!mealBoxList.html" method="post">
		包厢设置
		<hr />
		<table width="100%">
			<tr>
				<td>
					名称：
				</td>
				<td>
					<input type="text" name="name"/> 
				</td>
				<td>
					容纳人数：
				</td>
				<td>
					<input type="text" name="peopleNumber" />
				</td>
				<td>
					最低消费：
				</td>
				<td>
					<input type="text" name="lowConsume" />
				</td>
				<td>
					<input type="submit" value="查询" />
				</td>
				<td width="50" style="text-align:right;">
					 <a href="mealbox!mealBox.html">添加</a>
				</td>
			</tr>
		</table>
		<br/>
		
		<table width="100%" border="1">
			<tr>
				<td><input type="checkbox" name="mealBoxAll"/> </td>
				<td>序号</td>
				<td>图片</td>
				<td>名称</td>
				<td>类型</td>
				<td>人数</td>
				<td>最低消费</td>
				<td>备注 </td>
				<td>操作</td>
			</tr> 
			<s:iterator value="mealBoxList" status="index">
				<tr>
					<td><input type="checkbox" name="mealBoxList"/> </td>
					<td>${index.count}</td>
					<td><img src="${webUrl }${images }" /></td>
					<td>${name }</td>
					<td>${type }</td>
					<td>${peopleNumber }</td>
					<td>${lowConsume }</td>
					<td>${remark } </td>
					<td><a href="javascript:;" onclick="deleteMealBox(${id});">删除</a> | <a href="mealbox!updateMealBox.html?id=${id}">修改</a></td>
				</tr> 
			</s:iterator>
		</table>
		<div>
			<jsp:include page="../include/page.jsp"></jsp:include> 
		</div>
	</form>
		<script>
			function deleteMealBox(id) {
				var dt = new Date();
				$.ajax( {
					type : "POST",
					url : "mealbox!mealBoxDelete.html",
					data : "id=" + id + "&date=" + dt,
					success : function(data) {
						if ($.trim(data) == 0) {
							alert('删除成功');
							document.location.reload();
						}
					}
				});
			}
		</script>
	</body>
</html>